<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
    <title>Methods</title>
	<meta name="generator" content="HeaderDoc">
</head><body bgcolor="#ffffff"><h1><font face="Geneva,Arial,Helvtica">Methods</font></h1><hr><br>
<a name="//apple_ref/occ/instm/NKDModifiedPlesseyBarcode/_encodeChar:"></a>
<h3><a name="_encodeChar:">_encodeChar:</a></h3>
<b>Abstract:</b> Overridden to provide correct encoding of numeric data.

<blockquote><pre><tt>- (NSString *)<B>_encodeChar:</B>(char)<I>inChar;</I> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> String of 1s and 0s representing the encoded content
 
<hr>
<a name="//apple_ref/occ/instm/NKDModifiedPlesseyBarcode/generateChecksum"></a>
<h3><a name="generateChecksum">generateChecksum</a></h3>
<b>Abstract:</b> Generates the check digit or checksum for this barcode encoding scheme.

<blockquote><pre><tt>- (void)<B>generateChecksum;</B> </tt><br>
</pre></blockquote>
<p>***TO DO: The MODIFIED Plessey check digit is calculated by using the following steps. 
<br><br>
-Starting from the units position, create a new number with all of 
the odd position digits in their original sequence. 
-Multiply this new number by 2. 
-Add all of the digits of the product from step two. 
-Add all of the digits not used in step one to the result in step three. 
-Determine the smallest number which when added to the result in step four 
will result in a multiple of 10. This is the check character. 
<br><br>
</p>
<hr>
<a name="//apple_ref/occ/instm/NKDModifiedPlesseyBarcode/initWithContent:printsCaption"></a>
<h3><a name="initWithContent:printsCaption">initWithContent:printsCaption</a></h3>
<b>Abstract:</b> Initializes new barcode object with provided data and specifies whether a caption should be printed
below the barcode. This overridden initialization routine sets the bar width to .1, yielding a .3 wide bar dize.

<blockquote><pre><tt>- (id)<B>initWithContent:</B>(NSString *)inContent
      <I></I> <B>printsCaption:</B>(BOOL)<I>inPrints;</I> </tt><br>
</pre></blockquote>
<p></p>
<h4>Parameters</h4>
<blockquote>
<table border="1"  width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inContent</tt></td><td>A string containing the data to be encoded; should use only <B>ASCII-8</B> characters
(those that can be encoded using a single char in UTF-8)</td></tr>
<tr><td align="center"><tt>inPrints</tt></td><td>YES if caption should print.</td></tr>
</table>
</blockquote>
<b>Result:</b> Returns initialized NKDBarcode class
 
<hr>
<a name="//apple_ref/occ/instm/NKDModifiedPlesseyBarcode/initiator"></a>
<h3><a name="initiator">initiator</a></h3>
<b>Abstract:</b> Returns the encoded initiator or alignment bar(s)

<blockquote><pre><tt>- (NSString *)<B>initiator;</B> </tt><br>
</pre></blockquote>
<p>Returns encoded string representing the left most character which is Binary ONE_BIT
ONE_BIT ZERO_BIT ONE_BIT
</p>
<b>Result:</b> String of 0s and 1s representing the first (non-content) character or alignment bar(s).

<hr>
<a name="//apple_ref/occ/instm/NKDModifiedPlesseyBarcode/terminator"></a>
<h3><a name="terminator">terminator</a></h3>
<b>Abstract:</b> Returns the encoded terminator or alignment bar(s)

<blockquote><pre><tt>- (NSString *)<B>terminator;</B> </tt><br>
</pre></blockquote>
<p>Returns encoded string representing the right-most character.  We'll use a single thick bar so that our
code can be scanned left-to-right or right-to-left. The thick bar is followed by the  reverse-start symbol, '1100' 
backwards, or '0011'
</p>
<b>Result:</b> String of 0s and 1s representing the last (non-content) character or alignment bar(s).
    
<hr>
<p>(Last Updated 4/21/2003)
</p></body></html>
